import Vue from "vue";
import VueRouter from "vue-router";
import MyIndex from "@/views/MyIndex.vue";
import MyNews from "@/views/MyNews.vue";
import MySports from "@/views/MySports.vue";
import SportsIndex from "@/views/SportsIndex.vue";
import SportsHome from "@/views/SportsHome.vue";
import SportsAbroad from "@/views/SportsAbroad.vue";
Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: "/", component: MyIndex },
    { path: "/news", component: MyNews },
    {
      path: "/sports",
      component: MySports,
        children: [
            { path: "/", component: SportsIndex },
            { path: "sportshome", component: SportsHome },
            { path: "sportsabroad", component: SportsAbroad },
        ],
    },
  ],
});

export default router;
